$(document).ready(function(){
	var server = "cdt"
	$('.pickupBtn').bind('click',function(){
		if(!isNaN($('.pickupMoney').val())){
			var pickupMoney = parseFloat($('.pickupMoney').val());
			var money = parseFloat($('.money').text());
			if(pickupMoney <= money){
				$.getJSON("/"+server+"/cashPickup?access_token="+$('.access_token').val()+"&cashPickup="+pickupMoney,function(json){
					if(json.result == 1){
						money = money-pickupMoney;
						$('.money').text(money);
						$.prompt('',1,'','提现成功',3,1);
					}
					else{
						$.prompt('',1,'','提现失败',1,1);
					}
				})
			}
		}
		else{
			$.prompt('',1,'','请输入数字',1,1);
		}
	})
})